"""数据模型 StudentModel"""


class StudentModel:
    """
    数据模型类 StudentModel
            数据：编号 ID ，姓名 nama ， 年龄 age ， 成绩 score
    """

    def __init__(self, name, age, score, sex, id=0):
        self.__id = id
        self.name = name
        self.age = age
        self.score = score
        self.sex = sex

    @property
    def id(self):
        return self.__id

    @id.setter
    def id(self, value):
        self.__id = value

    @property
    def name(self):
        return self.__name

    @name.setter
    def name(self, name):
        self.__name = name

    @property
    def age(self):
        return self.__age

    @age.setter
    def age(self, value):
        self.__age = value

    @property
    def score(self):
        return self.__score

    @score.setter
    def score(self, value):
        self.__score = value

    @property
    def sex(self):
        return self.__sex

    @sex.setter
    def sex(self, sex):
        self.__sex = sex
